"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_up_badge2 = common_vendor.resolveComponent("up-badge");
  _easycom_up_badge2();
}
const _easycom_up_badge = () => "../../node-modules/uview-plus/components/u-badge/u-badge.js";
if (!Math) {
  _easycom_up_badge();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "menuWithBg",
  props: {
    menuList: {
      type: Array,
      default: 208
    }
  },
  emits: ["onMenuItem"],
  setup(__props, { emit: __emit }) {
    const emit = __emit;
    const onMenuItem = (item) => {
      emit("onMenuItem", item);
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.f(__props.menuList, (item, index, i0) => {
          return {
            a: common_vendor.t(item.title),
            b: "f845dbb8-0-" + i0,
            c: common_vendor.p({
              max: "99",
              value: item.badge,
              color: "#fff",
              bgColor: "#F20000",
              show: item.badge ? true : false,
              absolute: true,
              offset: item.title.length > 4 ? [5, 10] : [15, 10]
            }),
            d: common_vendor.n(`menu-with-bg-item rounded-1 ${item.bgColor}-bg`),
            e: index,
            f: common_vendor.o(($event) => onMenuItem(item), index)
          };
        })
      };
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f845dbb8"]]);
wx.createComponent(Component);
